package mao.exaimnation.huawei.huawei;

import java.util.Scanner;

/**
 *  //按照X进行合并重新排序字符串。
 */
public class Main4 {

    static class huawei1 {
        //按例直接进行添加，然后再按照列进行合并。
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String s = "EVERYTHINGGOESWELL";
            int num = 5;

            char[] strarray = s.toCharArray();
            String[] res = new String[num];

            for(int i1 = 0;i1<res.length;i1++)
                res[i1] = "";
            int left = -1;
            int right = num;
            int i = 0;
            boolean flag = true;
            while(i<strarray.length) {
                if(flag) {
                    left++;
                    right--;
                    if(left <right) {
                        res[left]+=(strarray[i++]);
                        res[right]+=(strarray[i++]);
                    }else {
                        res[left]+=strarray[i++];
                        flag = false;
                    }
                }else {
                    left--;
                    right++;
                    if(left>0 &&right <num-1) {
                        res[left] += strarray[i++];
                        res[right] += strarray[i++];
                    }else {
                        res[left] += strarray[i++];
                        res[right] += strarray[i++];
                        flag = true;
                    }
                }

            }
            String temp = "";
            for(int i1 = 0;i1<res.length;i1++)
                temp += res[i1];
            System.out.println(temp);
        }
    }
}
